/**
 * Project Name:九色鹿
 * File Name:RetCode.java
 * Package Name:com.fxp.project.jiuselu.commons.code
 * Date:2021-08-25 11:36 下午
 * Copyright (c) 2021, Jason.Wang All Rights Reserved.
 */
package com.fxp.project.jiuselu.commons.code;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * ClassName: RetCode<br/>
 * Function: 错误码返回对象<br/>
 * Date: 2021-08-25 11:36 下午<br/>
 *
 * @author Jason.Wang
 * @version 1.0.0.0
 * @see
 * @since JDK 1.8
 */
@Data
@AllArgsConstructor
public class RetCode {
    /**
     * 状态码
     */
    private Integer code;
    /**
     * 提示信息
     */
    private String message;

    public static RetCode mark(int code, String message) {
        return new RetCode(code, message);
    }

    public static RetCode mark(Integer code) {
        return new RetCode(code, null);
    }
}
